//
//  MultipleIPModel.m
//  Estate
//
//  Created by heyong on 2017/4/1.
//  Copyright © 2017年 ttsx. All rights reserved.
//

#import "MultipleIPModel.h"

@implementation MultipleIPModel
@synthesize ip;
@synthesize port;
@synthesize remark;
@synthesize isSel;

-(void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:ip forKey:@"ip"];
    [aCoder encodeObject:port forKey:@"port"];
    [aCoder encodeObject:remark forKey:@"remark"];
    [aCoder encodeBool:isSel forKey:@"isSel"];
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    if (self = [super init]) {
        self.ip = [aDecoder decodeObjectForKey:@"ip"];
        self.port = [aDecoder decodeObjectForKey:@"port"];
        self.remark = [aDecoder decodeObjectForKey:@"remark"];
        self.isSel = [aDecoder decodeBoolForKey:@"isSel"];
    }
    return self;
}

#pragma mark NSCoping
- (id)copyWithZone:(NSZone *)zone {
    MultipleIPModel *copy = [[[self class] allocWithZone:zone] init];
    copy.isSel = self.isSel;
    copy.port = [self.port copyWithZone:zone];
    copy.remark = [self.remark copyWithZone:zone];
    copy.ip = [self.ip copyWithZone:zone];
    return copy;
}

- (id)mutableCopyWithZone:(NSZone *)zone {
    MultipleIPModel *copy = [[MultipleIPModel alloc] init];
    if (copy) {
        copy.isSel = self.isSel;
        copy.port = [self.port copyWithZone:zone];
        copy.remark = [self.remark copyWithZone:zone];
        copy.ip = [self.ip copyWithZone:zone];
        
    }
    return copy;
}

@end
